<div class="divColorbox">
    <div class="divColorbox_Header">
        <span><i class="fa fa-star"></i><span>艺人提现结算信息</span></span>
        <a class="Refresh"></a><a class="Close"></a>
    </div>
    <div class="divColorbox_Body row">
        <div>
            <input name="User_ID" type="hidden"/>
            <div class="row">
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">用户ID</span>
                        <input id="User_ID" type="text" class="form-control" value="" disabled/>
                        <input id="Order_No" type="hidden" class="form-control" value="" disabled/>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">昵称</span>
                        <input id="NickName" type="text" class="form-control" disabled/>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">手机号</span>
                        <input id="Phone" type="text" class="form-control" disabled/>
                    </div>
                </div>
            </div>
            <div class="hr"></div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="input-group">
                        <span class="input-group-addon">身份证</span>
                        <input id="IDCard" type="text" class="form-control" disabled/>
                        <span class="input-group-addon"><i class="fa fa-credit-card"></i></span>
                    </div>
                </div>
            </div>
            <div class="space-6"></div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="input-group">
                        <span class="input-group-addon">开户银行</span>
                        <input id="Account_BankName" type="text" class="form-control" disabled/>
                        <span class="input-group-addon"><i class="fa fa-university"></i></span>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="input-group">
                        <span class="input-group-addon">银行全称</span>
                        <input id="Account_BankFullName" type="text" class="form-control" disabled/>
                        <span class="input-group-addon"><i class="fa fa-university"></i></span>
                    </div>
                </div>
            </div>
            <div class="space-6"></div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="input-group">
                        <span class="input-group-addon"> 开户姓名</span>
                        <input id="Account_RealName" type="text" class="form-control" disabled/>
                        <span class="input-group-addon"><i class="fa fa-user"></i></span>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="input-group">
                        <span class="input-group-addon">开户帐号</span>
                        <input id="Account_CardNo" type="text" class="form-control" disabled/>
                        <span class="input-group-addon"><i class="fa fa-pencil"></i></span>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <img src="" id="J_Family_IdCard_A_Img">
                </div>
                <div class="col-sm-6">
                    <img src="" id="J_Family_IdCard_B_Img">
                </div>
            </div>
        </div>
    </div>
    <div class="divColorbox_Footer">
        <button type="button" id="btnEdit_Agree" class="btn btn-primary">
            <i class="fa fa-check"></i> 结算
        </button>
        <!--<button type="button" id="btnEdit_Disagree" class="btn btn-warning">-->
        <!--<i class="fa fa-close"></i> 拒绝-->
        <!--</button>-->
        <button type="button" id="btnUndo"></button>
    </div>
</div>
<script>
    $(function () {
        if (_PageData.flag != 0) {
            $.KOC.Tips.Open("Error", _PageData.flag, {
                Timeout: 1000,
                onClose: function () {
                    parent.$.colorbox.close();
                }
            });
            return;
        }
        //////////////////////////////////////////////////////////
        //通过申请
        //////////////////////////////////////////////////////////
        $('#btnEdit_Agree').on('click', function () {
            var params = {};
            params.Order_No = $.trim($('#Order_No').val());
            if (!params.Order_No) {
                $.KOC.Tips.Open('Error', '数据出错请刷新', {Timeout: 2000});
                return false;
            }
            $.KOC.Loading.Open();
            $.ajax({
                url: '/ajax/user.user-anchor.anchorwithdrawcheck',
                type: 'post',
                dataType: 'json',
                data: {
                    Order_No: params.Order_No,
                    Status: 1
                },
                success: function (data) {
                    $.KOC.Loading.Close();
                    if (data.flag !== 0) {
                        $.KOC.Tips.Open("Error", data.msg + "(" + data.flag + ")", {Timeout: 2000});
                        return;
                    }
                    $.KOC.Tips.Open('Success', '审核完成', {
                        Timeout: 1000,
                        onClose: function () {
                            parent.$.colorbox.close();
                            parent.window.location.href = "/finance-manage/anchor-manage/cash";
                        }
                    });
                }
            });
        });
        //////////////////////////////////////////////////////////
        //驳回申请
        //////////////////////////////////////////////////////////
        $('#btnEdit_Disagree').on('click', function () {
            var params = {};
            params.Order_No = $.trim($('#Order_No').val());
            if (!params.Order_No) {
                $.KOC.Tips.Open('Error', '数据出错请刷新', {Timeout: 2000});
                return false;
            }
            $.KOC.Loading.Open();
            $.ajax({
                url: '/ajax/user.user-anchor.anchorwithdrawcheck',
                type: 'post',
                dataType: 'json',
                data: {
                    Order_No: params.Order_No,
                    Status: 2
                },
                success: function (data) {
                    $.KOC.Loading.Close();
                    if (data.flag !== 0) {
                        $.KOC.Tips.Open("Error", data.msg + "(" + data.flag + ")", {Timeout: 2000});
                        return;
                    }
                    $.KOC.Tips.Open('Success', '审核完成', {
                        Timeout: 1000,
                        onClose: function () {
                            parent.$.colorbox.close();
                            parent.window.location.href = "/finance-manage/anchor-manage/cash";
                        }
                    });
                }
            });
        });
        //////////////////////////////////////////////////////////
        //数据绑定
        //////////////////////////////////////////////////////////
        $('#J_Family_IdCard_A_Img').attr('src', _VirtualPath.Utils + "service/img/user/idcard-a/" + _PageData.User_ID + ".jpg");
        $('#J_Family_IdCard_B_Img').attr('src', _VirtualPath.Utils + "service/img/user/idcard-b/" + _PageData.User_ID + ".jpg");
        $('#User_ID').val(_PageData.User_ID);
        $('#Order_No').val(_PageData.Order_No);
        $('#NickName').val(_PageData.NickName);
        $('#Phone').val(_PageData.Phone);
        $('#IDCard').val(_PageData.IDCard);
        $('#Account_BankName').val(_PageData.Account_BankName);
        $('#Account_BankFullName').val(_PageData.Account_BankFullName);
        $('#Account_RealName').val(_PageData.Account_RealName);
        $('#Account_CardNo').val(_PageData.Account_CardNo);
    });
</script>